package com.jlcindia;

public class OOPTest17 {

	public static void main(String[] args) {
	Person p1=new Person();
	p1.age=24;
	p1.phone=7795484339L;
	Person p2=p1;
	System.out.println("p1:"+p1.age+"\t"+p1.phone);
	System.out.println("p2:"+p2.age+"\t"+p2.phone);
	System.out.println("\n Modifying the data using p2");
	//p2=new Person();
	p2.age=43;
	p2.phone=9557312345L;
	System.out.println("p1:"+p1.age+"\t"+p1.phone);
	System.out.println("p2:"+p2.age+"\t"+p2.phone);
	System.out.println("\n Modifying the reference p2");
	p2=new Person();
	p2.age=25;
	p2.phone=9557378130L;
	System.out.println("p1:"+p1.age+"\t"+p1.phone);
	System.out.println("p2:"+p2.age+"\t"+p2.phone);
	}

}
class Person{
	int age;
	long phone;
}
